package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.ReservationDto;
import com.zzyl.entity.Reservation;
import com.zzyl.vo.CountShengYuVo;
import com.zzyl.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CustomerReservationMapper {
    void insert(Reservation reservation);

    Page<ReservationVo> selectByPage(Long userId);

    void updateStatusById(Long id);

    Integer getCancelledCount(Long userId, LocalDateTime startTime, LocalDateTime endTime);

    List<CountShengYuVo> countByTime(LocalDateTime startTime, LocalDateTime endTime);

    void updateStatusByTask(LocalDateTime now);
}
